/* 
 *  Identifier
 *
 *  Identifier is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  Foobar is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY ); without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 **********************************************************************************
 *  WARNING: THIS CODE WAS GENERATED DO NOT MODIFY, CHANGE THE XSD INSTEAD
 *  Generated by schema2code on Tue Jun 14 15:34:00 2016.
 **********************************************************************************
 *  Copyright 2010
 *
 */

#ifndef __IDENTIFIER_H__
#define __IDENTIFIER_H__

#include <QObject>
#include <QString>
#include <QDateTime>
#include "IVEFOtherId.h"
#include "IVEFOtherName.h"

class XmlStreamReader;

namespace ivef {

//-----------------------------------------------------------
//! \brief       Class definition of Identifier
//!
//! (local) Identification of vessel
//!
class Identifier : public QObject { 
    Q_OBJECT

public:
    //! constructor
    //!
    Identifier();
    //! constructor for parser function
    //!
    Identifier(XmlStreamReader&);
    //! copy constructor
    //!
    Identifier(const Identifier&);
    //! = operator
    //!
    Identifier & operator=(const Identifier& val);
    //! == operator
    //!
    bool operator==(const Identifier& val);
    //! removes a OtherId.
    //!
    bool removeOtherId(const OtherId& val);

    //! adds a OtherId.
    //!
    bool addOtherId(const OtherId& val);

    //! gets the i-th OtherId.
    //!
    const OtherId& getOtherIdAt(int i) const;

    //!              return the number of OtherId objects.
    //!
    //! \return     int
    int countOfOtherIds() const;

    //! removes a OtherName.
    //!
    bool removeOtherName(const OtherName& val);

    //! adds a OtherName.
    //!
    bool addOtherName(const OtherName& val);

    //! gets the i-th OtherName.
    //!
    const OtherName& getOtherNameAt(int i) const;

    //!              return the number of OtherName objects.
    //!
    //! \return     int
    int countOfOtherNames() const;

    //! sets the Callsign: Callsign of the target, in accordance with Article 19, Section III of the ITU Radio Regulations (RR)
    //!
    bool setCallsign(QString val);

    //! gets the Callsign: Callsign of the target, in accordance with Article 19, Section III of the ITU Radio Regulations (RR)
    //!
    //! \return     QString
    //!
    QString getCallsign() const;

    //! returns true if Callsignis used (optional field).
    //!
    //! \return     bool
    bool hasCallsign() const;

    //! sets the IMO: IMO number of the target
    //!
    bool setIMO(int val);

    //! gets the IMO: IMO number of the target
    //!
    //! \return     int
    //!
    int getIMO() const;

    //! returns true if IMOis used (optional field).
    //!
    //! \return     bool
    bool hasIMO() const;

    //! sets the Name: Name of the target
    //!
    bool setName(QString val);

    //! gets the Name: Name of the target
    //!
    //! \return     QString
    //!
    QString getName() const;

    //! returns true if Nameis used (optional field).
    //!
    //! \return     bool
    bool hasName() const;

    //! sets the FormerName: Previous name of the target
    //!
    bool setFormerName(QString val);

    //! gets the FormerName: Previous name of the target
    //!
    //! \return     QString
    //!
    QString getFormerName() const;

    //! returns true if FormerNameis used (optional field).
    //!
    //! \return     bool
    bool hasFormerName() const;

    //! sets the Flag: The country flag (ISO 3166-1-alpha2)
    //!
    bool setFlag(QString val);

    //! gets the Flag: The country flag (ISO 3166-1-alpha2)
    //!
    //! \return     QString
    //!
    QString getFlag() const;

    //! returns true if Flagis used (optional field).
    //!
    //! \return     bool
    bool hasFlag() const;

    //! sets the Owner: Name of owner the target
    //!
    bool setOwner(QString val);

    //! gets the Owner: Name of owner the target
    //!
    //! \return     QString
    //!
    QString getOwner() const;

    //! returns true if Owneris used (optional field).
    //!
    //! \return     bool
    bool hasOwner() const;

    //! sets the MMSI: MMSI number of the target
    //!
    bool setMMSI(int val);

    //! gets the MMSI: MMSI number of the target
    //!
    //! \return     int
    //!
    int getMMSI() const;

    //! returns true if MMSIis used (optional field).
    //!
    //! \return     bool
    bool hasMMSI() const;

    //! sets the LRIT: LRIT identification
    //!
    bool setLRIT(QString val);

    //! gets the LRIT: LRIT identification
    //!
    //! \return     QString
    //!
    QString getLRIT() const;

    //! returns true if LRITis used (optional field).
    //!
    //! \return     bool
    bool hasLRIT() const;

    //! generates XML of this object including attributes and child elements
    //! returns QString::null if not all required elements are available
    //! If null returned check lastError() for problem description
    //!
    //! \return     QString
    const QString& toXML(bool outputNamespace = true);

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString() const;

    //! generates output of this object including attributes and child elements
    //!
    //! \return     QString
    QString toString(QString lead) const;

    //! return last error found in toXML function
    //!
    //! \return     QString
    const QString& lastError() const;

    //! return changed 
    //!
    //! \return     bool
    const bool& changed() const;

    //! return store 
    //!
    //! \return     QString
    const QString& store() const;


private:
    QList<OtherId> m_otherIds;
    QList<OtherName> m_otherNames;
    QString m_callsign;
    bool m_callsignPresent;
    int m_IMO;
    bool m_IMOPresent;
    QString m_name;
    bool m_namePresent;
    QString m_formerName;
    bool m_formerNamePresent;
    QString m_flag;
    bool m_flagPresent;
    QString m_owner;
    bool m_ownerPresent;
    int m_MMSI;
    bool m_MMSIPresent;
    QString m_LRIT;
    bool m_LRITPresent;
    QString m_lastError; 
    bool m_changed; 
    QString m_store;
}; 
} //end ns

#endif
